package com.jingyong.infosite.web;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.fasterxml.jackson.core.type.TypeReference;
import com.jingyong.infosite.entities.百科;
import com.jingyong.infosite.util.JsonUtil;

import io.swagger.annotations.Api;

@RequestMapping(path = "encyclopedia")
@Api("百科")
public class EncyclopediaController {
	private static final String ENCYCLOPEDIA_JSON = "[{\"平台\":\"宜人贷\",\"投资人数\":\"135822\",\"满标用时\":\"1.47\",\"前十大土豪待收金额占比\":\"0.41\",\"人均投资金额\":\"0.17\"}]";

	@RequestMapping(path = "", method = RequestMethod.GET)
	public List<百科> getDeals() {
		return JsonUtil.convertStringToBean(ENCYCLOPEDIA_JSON, new TypeReference<List<百科>>() {
		});
	}
}
